<?php
namespace App\Http\Controllers;

use App\Question;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class RegController extends Controller
{
	public function index(Request $request)
	{

		$name = $request->input();

		var_dump($name);exit;

		$data = Question::all();

		foreach ($data as $item) {
		    var_dump($item->title);
		}

		exit;

		// App\Question::where('question_id', 6)
	 //      ->update(['status' => 1]);


		 // $users = DB::select('select * from bbs_user');

		 

		 // $users = DB::table('bbs_user')->get();

		 // DB::table('users')->where('name', '学院君')->first();

		 // var_dump($users);

		 // DB::table('users')->where('name', '学院君')->value('email');

		 // DB::table('users')
   //          ->join('contacts', 'users.id', '=', 'contacts.user_id')
   //          ->join('orders', 'users.id', '=', 'orders.user_id')
   //          ->select('users.*', 'contacts.phone', 'orders.price')
   //          ->get();


		$data = ['name'=>'学并思'];

		return view('reg/xbs',$data);
	}
}